<!DOCTYPE html>
<!-- saved from url=(0038)http://vision.stanford.edu/people.html -->
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>宽带组 : 实验室成员</title>
  <script type="text/javascript" src="js/header.js"></script>
  <link href="css/bootstrapmin.css" rel="stylesheet" media="screen">
  <link href="css/style.css" rel="stylesheet">

 
</head>

<body style="background:url(img/index_bg.jpg);">

<?php
	require("header.php");
	echo"<div id= \"achievement1\">";
	require("DBops.php");
	session_start();
	if(isset($_SESSION['user'])){
		echo "<div style='height:30px;background:#A4D3EE;'>
              <p  style='margin-right:10px;float:right;'>登录为: <a href = \"infor.php?id=".$_SESSION['user']."\">".$_SESSION['user']."</a></font>&nbsp&nbsp<a  onclick=\"if(confirm('确定要退出系统吗?')){parent.location.href ='logout.php'}\" href=\"javascript:void(0)\">退出</a></font></p></div>";
	}
	else
	{
		$_SESSION['userurl'] = $_SERVER['REQUEST_URI']; 
		echo "<div style='height:30px;background:#A4D3EE;'>
				<ul>
              <li  style='margin-right:10px;float:right;'><a href ='login.php'>登录</a></div>";
	}
	
	?>
</div>
	<br/><br/>

<?php
	echo"<div id='achievement2'>";
	$con = connect("localhost", "root", "", "lab");
	$result = query($con, "*", "personalinfo", "role", "teacher");
	
	 	while($row = mysql_fetch_array($result)){
			$email=$row['email'];
		
			$email1= str_replace("@", " At ", $email);
			 echo "<div style='width:450px;height:250px;float:left;'>	
				<div class=\"faculty\">
				<a href='Infor.php?id=".$row['ID']."'><img src='".$row['image']."' ></img></a>
				<div class=\"bio\">
				<a href='Infor.php?id=".$row['ID']."'><b>".$row['name']."</b></a>
				 <br />
				<hr class=\"dark\">
				 <br />".$row['titleOrDegree']."
				<br />".$row['center']."
				<br /><strong>研究方向</strong>:&nbsp;&nbsp;".$row['researchArea']."
				 <hr class=\"dark\">
				<div style=\"height:20px;\"></div>
				 <table >
					  <tbody>
							<tr><td width=\"\"><b>办公室:&nbsp;&nbsp;</b></td><td>".$row['office']."</td></tr>
							
							<tr><td><b>邮箱:</b></td><td>".$email1."</td></tr>
        
					</tbody>
				</table>
			</div>
				</div>
			</div>";
			}
		echo"</div>";
?>
		
<br/><br/><br/><br/> 
<?php

	echo"<div class='container'>
			<hr class='dark1'>
			<p><strong>博士</strong></p>
			<br/><br/>
		<div id='membersdiv'>";
	//$con = connect("localhost", "root", "", "lab");
	$result = query($con, "*", "personalinfo", "titleOrDegree", "博士");

	while($row=mysql_fetch_array($result)){
		echo" 
				<a href='Infor.php?id=".$row['ID']."'>
				<div class='member'>";
				if($row['image']){
					echo"  <img src='".$row['image']."'>";}
				else{echo"<img src='img/noavatar_big.gif'>";}
			echo"
		
			<div class='bio'>
				<div class='bname'><b>".$row['name']."</b></div>
				<div class='bname'>".$row['researchArea']."</div>
			</div>
			</div>
			</a>
		";
		}
	echo"</div></div>";
?>
		
<?php
	echo"
	<div class='container'>
	<hr class='dark1'>
	<p><strong>硕士</strong></p>
	<br/><br/>
	<div id='membersdiv'>";
    $result = query($con, "*", "personalinfo", "titleOrDegree", "硕士");

	while($row = mysql_fetch_array($result)){
	echo" 
				<a href='Infor.php?id=".$row['ID']."'>
				<div class='member'>";
				if($row['image']){
					echo"  <img src='".$row['image']."'>";}
				else{echo"<img src='img/noavatar_big.gif'>";}
			echo"
		
			<div class='bio'>
				<div class='bname'><b>".$row['name']."</b></div>
				<div class='bname'>".$row['researchArea']."</div>
			</div>
			</div>
			</a>
		";
		}
	echo"</div></div>";
?>
  
<?php

	echo"
	<div class='container'>
			<hr class='dark1'>
			<p><strong>已毕业</strong></p>
			<br/><br/>
		<div id='membersdiv'>";
	//$con = connect("localhost", "root", "", "lab");
	$result = query($con, "*", "personalinfo", "titleOrDegree", "已毕业");

	while($row=mysql_fetch_array($result)){
		echo" 
				<a href='Infor.php?id=".$row['ID']."'>
				<div class='member'>";
				
			echo"
		
			<div class='bio'>
				<div class='bname'><b>".$row['name']."</b></div>
				<div class='bname'>".$row['researchArea']."</div>
			</div>
			</div>
			</a>
		";
		}
	echo"</div></div>";
?> 
<?php
	echo"
	<div class='container'>
	<hr class='dark1'>
	<p><strong>成员</strong></p>
	<br/><br/>
	<div id='membersdiv'>";
	$result = mysql_query("select * from personalinfo where titleOrDegree is null");
   // $result = query($con, "*", "personalinfo", "titleOrDegree", null);

	while($row = mysql_fetch_array($result)){
	echo" 
				<a href='Infor.php?id=".$row['ID']."'>
				<div class='member'>";
				if($row['image']){
					echo"  <img src='".$row['image']."'>";}
				else{echo"<img src='img/noavatar_big.gif'>";}
			echo"
		
			<div class='bio'>
				<div class='bname'><b>".$row['name']."</b></div>
				<div class='bname'>".$row['researchArea']."</div>
			</div>
			</div>
			</a>
		";
		}
	echo"</div></div>";
?>
     
	</body>
	</html>